<?php echo $this->fetch('header.html'); ?>    
<div class="mb-head">
    <a href="javascript:history.back(-1);" class="l_b"></a>
    <!--<div class="tit">店铺</div>-->
    <div class="search">
        <div class="search-box">
            <form>
                <input type="hidden" name="app" value="search"/>
                <input type="hidden" name="act" value="store"/>
                <input type="text" name="keyword"  value="" placeholder="搜索相关店铺" class="keyword" />
                <input type="submit" class="search-btn" value="" />
            </form>
        </div>
    </div>
    <a href="<?php echo url('app=category&act=store'); ?>" class="r_b icon-cat">分类</a>
</div>  
<div class="new-tab">
     <ul class="tab-ul">
                <li <?php if ($this->_var['cate_id'] == 0): ?> class="cur"<?php endif; ?>><a href="<?php echo url('app=search&act=store'); ?>">全部</a></li>
                <?php $_from = $this->_var['scategorys']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'category');$this->_foreach['fe_category'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['fe_category']['total'] > 0):
    foreach ($_from AS $this->_var['category']):
        $this->_foreach['fe_category']['iteration']++;
?>
                <li id="cat_<?php echo $this->_var['category']['id']; ?>" <?php if ($this->_var['cate_id'] == $this->_var['category']['id']): ?> class="cur"<?php endif; ?>><a href="<?php echo url('app=search&act=store&cate_id=' . $this->_var['category']['id']. ''); ?>"><?php echo htmlspecialchars($this->_var['category']['value']); ?></a></li>
                <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
    </ul>
</div>
<script>
    $(function () {
       
        x = $("#cat_"+<?php echo $this->_var['cate_id']; ?>).offset();
        if(x.left > $(document).width()){
            $(".tab-ul").scrollLeft(x.left-$(document).width()/2.0);
        }
        
    })  
</script>
<div class="radius">
    <ul>
        <?php $_from = $this->_var['stores']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'store');if (count($_from)):
    foreach ($_from AS $this->_var['store']):
?>
        <li style="padding: 10px;border-top: none;overflow: hidden;<?php if ($this->_foreach['fe_goods']['iteration'] != 1): ?>border-bottom: 1px solid #e0e0e0;<?php endif; ?>line-height: 1.6em;">
            <a href="<?php echo url('app=store&id=' . $this->_var['store']['store_id']. ''); ?>" style="display: block;overflow: hidden;lear: both;padding: .22em 0;">
                <span class="mu-tmb" style="float:left;margin-right:8px;">
                    <img src="<?php echo $this->_var['site_url']; ?>/<?php echo $this->_var['store']['store_logo']; ?>" alt="<?php echo htmlspecialchars($this->_var['store']['store_name']); ?>" width="100" height="100"/>
                </span>
                <span><?php echo htmlspecialchars($this->_var['store']['store_name']); ?></span>
                <span class="red" style="display: block;"><?php echo htmlspecialchars($this->_var['store']['user_name']); ?></span>
                <span><?php echo htmlspecialchars($this->_var['store']['region_name']); ?><img src="<?php echo $this->_var['store']['credit_image']; ?>"/></span>
            </a>
        </li>
        <?php endforeach; else: ?>
    <div class="null">
        <p>很抱歉！没有找到相关商品~</p>
    </div>
        <?php endif; unset($_from); ?><?php $this->pop_vars();; ?>
    </ul>
</div>
<?php echo $this->fetch('page.bottom.html'); ?>

<?php echo $this->fetch('footer.html'); ?>